	<div id="queryDivIncWlPlace" style="margin-right: 0px;  height: 460px; display:none;" >
              <table align="center" width=100% class="queryTable"  >
                <tr ><td align="center" style="{width:11%}">Please input criterial:</td>
                <td style="{width:22%}" ></td>
                <td style="{width:11%}"></td>
                <td style="{width:6%}" ></td>
                <td style="{width:11%}" ></td>
                <td style="{width:6%}" ></td>
                <td style="{width:11%}"></td>
                <td style="{width:22%}"></td></tr> 
                <tr ><td align="center" style="{width:11%}"></td>
                <td style="{width:22%}" ></td>
                <td style="{width:11%}"></td>
                <td style="{width:6%}" ></td>
                <td style="{width:11%}" ></td>
                <td style="{width:6%}" ></td>
                <td style="{width:11%}"></td>
                <td style="{width:22%}"></td></tr>  
                <tr>
                    <td align="right"  >postCode:</td>
                    <td align="left"  ><input type="text" class="editerInput"  id="querypostCodeIncWlPlace"  jsId="querypostCodeIncWlPlace"   dojoType="dijit.form.TextBox"  /></td>
                    <td align="right"  >placeName:</td>
                    <td align="left"  colspan="3" ><input type="text" class="editerInput"  id="queryplaceNameIncWlPlace"  jsId="queryplaceNameIncWlPlace"   dojoType="dijit.form.TextBox"  /></td>  
                    <td align="right"  >parentPlaceId:</td>
                    <td align="left"  ><span id="queryparentPlaceIdIncWlPlaceImg0"  ><input type="text" class="editerNumber" jsId="queryparentPlaceIdIncWlPlace"  id="queryparentPlaceIdIncWlPlace"  dojoType="mydojo.NumberTextBox"  /></span>
                        <span id="queryparentPlaceIdIncWlPlaceImg1"  style="{display:none}" ><input type="text" class="editerNumberSmall" jsId="queryparentPlaceIdIncWlPlace1"  id="queryparentPlaceIdIncWlPlace1"  dojoType="mydojo.NumberTextBox"  /></span>
                        <span hidefocus="true" style="{display:none}" onclick="selectSign(this);" id="queryparentPlaceIdIncWlPlaceImgup">></span>
                        <img src="../image/start.gif" onclick="queryType(this);" id="queryparentPlaceIdIncWlPlaceImg" height="15" width="20" border="0">
                        <span hidefocus="false"  style="{display:none}" onclick="selectSign(this);" id="queryparentPlaceIdIncWlPlaceImgdown" >></span>
                        <span id="queryparentPlaceIdIncWlPlaceImg2div" style="{display:none}"> <input type="text" class="editerNumberSmall"  jsId="queryparentPlaceIdIncWlPlace2"  id="queryparentPlaceIdIncWlPlace2"  dojoType="mydojo.NumberTextBox"  /></span>
                    </td>  
              </tr>
                <tr>
                    <td align="right"  >placeType:</td>
                    <td align="left"  ><input type="text" class="editerInput"  id="queryplaceTypeIncWlPlace"  jsId="queryplaceTypeIncWlPlace"   dojoType="dijit.form.TextBox"  /></td>
                    <td align="right"  >trafficeGrade:</td>
                    <td align="left"  colspan="3" ><input type="text" class="editerInput"  id="querytrafficeGradeIncWlPlace"  jsId="querytrafficeGradeIncWlPlace"   dojoType="dijit.form.TextBox"  /></td>  
                    <td align="right"  >remark:</td>
                    <td align="left"  ><input type="text" class="editerInput"  id="queryremarkIncWlPlace"  jsId="queryremarkIncWlPlace"   dojoType="dijit.form.TextBox"  /></td>  
              </tr>
	
          <tr align="center"><td></td>
		   <td colspan="2"><a onclick="querybuttonIncWlPlace();"><img src="../image/332.gif" height="20" width="20" border="0">OK</a></td>
           <td colspan="3"></td><td colspan="2"></td></tr>
         </table>
	     </div>
	       	<div align="right">
	          	 &nbsp;&nbsp;&nbsp;
				     <button dojoType="dijit.form.Button" id="selectIncPlace" jsId="selectIncPlace" onclick="selectPlaceFunClick();"  iconClass="plusIcon">ok</button>
          
	          	     <button dojoType="dijit.form.Button" onclick="querydisIncWlPlace();" iconClass="queryIcon" >query</button>
          </div>  
	        
	    <div style="{height:90%;width:100%}"  >
	         <div id="gridIncWlPlace"   ></div>
      </div>      
      <div align="right" ><span id="rowCountIncWlPlace"></span>
        <button dojoType="dijit.form.myButton" onclick="upPageIncWlPlace();"  id="but6IncWlPlace" disabled='true' jsId="but6IncWlPlace" iconClass="upPageIcon" >pageup</button><!--span dojoType="dijit.Tooltip" connectId="but6">pageup</span-->
        <!--button dojoType="dijit.form.myButton" onclick="downPageIncWlPlace();" id="but7IncWlPlace" disabled='true' jsId="but7IncWlPlace" iconClass="downPageIcon" >pagedown</button><!--span dojoType="dijit.Tooltip" connectId="but7">pagedown</span-->
        <span id="but7IncWlPlaceDiv" ></span>
		<div  dojoType="dijit.form.myDropDownButton" iconClass="pageIcon" ><span>pageNumber</span>
  			  <div dojoType="dijit.Menu">
				  <div dojoType="dijit.MenuItem" label="10"  iconClass="toPageIcon"		onClick="pageSizeChangeIncWlPlace(this.label);"></div>
				  <div dojoType="dijit.MenuItem"  label="30" iconClass="toPageIcon"		onClick="pageSizeChangeIncWlPlace(this.label);"></div>
		      <div dojoType="dijit.MenuItem"  label="50" iconClass="toPageIcon"		onClick="pageSizeChangeIncWlPlace(this.label);"></div>
					<div dojoType="dijit.MenuItem"  label="100" iconClass="toPageIcon"	onClick="pageSizeChangeIncWlPlace(this.label);"></div>
					<div dojoType="dijit.MenuItem"  label="noPage" iconClass="noPageIcon"	onClick="allpageIncWlPlace();"></div>
		      </div><!--span dojoType="dijit.Tooltip" connectId="668"></span-->
        </div>
		    <div dojoType="dijit.form.myDropDownButton" iconClass="pageStyleIcon"><span>pageStyle</span>
  			   <div dojoType="dijit.Menu">
  				 <div dojoType="dijit.MenuItem"  iconClass="rowIcon"		label="row"	onClick="pageStyleIncWlPlace(this.label);"></div>
  				 <div dojoType="dijit.MenuItem"  iconClass="colIcon"		label="col"	onClick="pageStyleIncWlPlace(this.label);"></div>
		    </div></div>
     </div>    
   <script type="text/javascript" >
     
          var gridIncWlPlacedata =  new Array();
          var queryIncWlPlacedata =  new Array();
          var queryIncWlPlacevo=new WlPlaceVOJs(); //
          var totalCountIncWlPlace=0 ;
          var totalpageIncWlPlace=0 ;
          var pagenumberIncWlPlace=1;
          var pagesizeIncWlPlace=10;     
		  var orderByIncWlPlace='%';
		  var gridIncWlPlace=undefined;
          var modelIncWlPlace = new dojox.grid.data.Table(null, gridIncWlPlacedata);
 var getVOIncWlPlace=function(queryIncWlPlacevo,pagenumberIncWlPlace,pagesizeIncWlPlace,orderByIncWlPlace){

      var pu = new SOAPClientParameters2();
		/*pu.add('placeName',queryIncWlPlacevo.placeName) ;
		pu.add('postCode',queryIncWlPlacevo.postCode) ;
	    pu.add('placeType',queryIncWlPlacevo.placeType) ;
	    pu.add('remark',queryIncWlPlacevo.remark) ;*/
		pu.add('placeName','%') ;
		pu.add('postCode','%') ;
	    pu.add('placeType','%') ;
	    pu.add('remark','%') ;
      SOAPClient.invoke(getUrl()+ "services/BasicManageService","getPlaceVO", pu, false,  function GetEnu_callBack(ul, soapResponse){      
           queryIncWlPlacedata=WlPlaceVOtoArray_fun(ul,false);
           totalCountIncWlPlace=ul[ul.length-1]["ns:id"]; 
           totalpageIncWlPlace=Math.ceil(new Number(totalCountIncWlPlace)/pagesizeIncWlPlace);
           document.getElementById("rowCountIncWlPlace").innerHTML=" "+pagenumberIncWlPlace+" / "+totalpageIncWlPlace+" / "+totalCountIncWlPlace+" " ;
      }); 
      queryIncWlPlacedata.splice(queryIncWlPlacedata.length-1,1);
	  var button7 = new dijit.form.myButton({label: "pagedown", onClick: downPageIncWlPlace,id:"but7IncWlPlace",iconClass:"downPageIcon" });
	  document.getElementById("but7IncWlPlaceDiv").appendChild(button7.domNode);
	  if(totalpageIncWlPlace>1){dijit.byId("but7IncWlPlace").setDisabled(false);}else{dijit.byId("but7IncWlPlace").setDisabled(true);}
	  modelIncWlPlace.setData(queryIncWlPlacedata);
      //dijit.byId("grid").updateRowCount(queryIncWlPlacedata.length); 
 } 
 
 var selectPlaceFunClick =function(){
    var rep=new Array();
    var allpeos=document.getElementsByName("selectWlPlace");
        for(var i=0;i<allpeos.length;i++){
          if(allpeos[i].checked==true){
            //rep=allpeos[i].id;
            if(ifMultPlace==0){
              rep=queryIncWlPlacedata[i];
            }else{
              rep[rep.length]=queryIncWlPlacedata[i];
            }
          }
      }
    selectPlaceFun(rep);
	oldFloatPlace.hide();
}     
var getChoiseIncWlPlace = function(inRowIndex) {
			if(selectPlaceIDs==queryIncWlPlacedata[inRowIndex][1]){
                  return  '<input class="dojoxGrid-input"  name="selectWlPlace" id="'+queryIncWlPlacedata[inRowIndex][1]+'" checked="true" type="checkbox"/>'
              }else{
                  return  '<input class="dojoxGrid-input"  name="selectWlPlace" id="'+queryIncWlPlacedata[inRowIndex][1]+'"  type="checkbox"/>'
              }
			    } 
          var layoutIncWlPlace =[{type: 'dojox.GridRowView', width: '20px' },{
                       
                                 cells: [ [
                                            {name: 'select', width: 3, get:getChoiseIncWlPlace},
                                           //{ name: 'choise', width: 3,field:0, styles: 'text-align: center;', editor: dojox.grid.editors.Bool },//
                                           { name: 'No.', width: 2, styles: 'text-align: center;', get: function(inRowIndex){ return inRowIndex+1;} },//
                      {name: 'postCode',field:2, width: 10 }
                    ,   {name: 'placeName',field:3, width: 10 }
                    ,   {name: 'parentPlaceId',field:4, width: 10 }
                    ,   {name: 'placeType',field:5, width: 10 }
                    ,   {name: 'trafficeGrade',field:6, width: 10 }
                    ,   {name: 'remark',field:7, width: 10 }
     
                                        ] ]
                                  }]; 
								  
//------------init 
 getVOIncWlPlace(queryIncWlPlacevo,pagenumberIncWlPlace,pagesizeIncWlPlace,orderByIncWlPlace);
      //querydataInc.splice(querydataInc.length-1,1);
	  if(gridIncWlPlace==undefined){
	  //modelIncWlPlace = new dojox.grid.data.Table(null, queryIncWlPlacedata);
				 gridIncWlPlace = new dojox.Grid({
					title: "ff",
					id: "gridIncWlPlace",
					jsId: "gridIncWlPlace",
					structure: layoutIncWlPlace,
					rowCount:queryIncWlPlacedata.length-1,
					model:modelIncWlPlace,
					singleClickEdit:true
				}, dojo.byId("gridIncWlPlace"));
				
			}else{ gridIncWlPlace.model.setData(queryIncWlPlacedata); } 
			
//-------------	



var allpageIncWlPlace =function(){
      pagenumberIncWlPlace=0;pagesizeIncWlPlace=0;
      getVOIncWlPlace(queryvoIncWlPlace,pagenumberIncWlPlace,pagesizeIncWlPlace,orderByIncWlPlace);
 }
var  pagesizeChangeIncWlPlace=function(mylabel){
    pagesizeIncWlPlace=mylabel;
    getVOIncWlPlace(queryvoIncWlPlace,pagenumberIncWlPlace,pagesizeIncWlPlace,orderByIncWlPlace);
 }           
var upPageIncWlPlace= function(){
     
     var pagenumbers=new Number(pagenumberIncWlPlace)-1;
     pagenumberIncWlPlace=pagenumbers.toString();
     getVOIncWlPlace(queryvoIncWlPlace,pagenumberIncWlPlace,pagesizeIncWlPlace,orderByIncWlPlace);
        //dijit.byId("grid").updateRowCount(querydata.length);      //dijit.byId("grid").update();
  			if(pagenumber==1){
        dijit.byId("but6IncWlPlace").setDisabled(true);
        }
        var totalpageIncWlPlace=Math.ceil(new Number(totalCountIncWlPlace)/pagesizeIncWlPlace);
        if(totalpageIncWlPlace>pagenumberIncWlPlace){
        dijit.byId("but7IncWlPlace").setDisabled(false);
        }
        var totalpageIncWlPlace=Math.ceil(new Number(totalCountIncWlPlace)/pagesizeIncWlPlace);
        document.getElementById("rowCountIncWlPlace").innerHTML=" "+pagenumberIncWlPlace+" / "+totalpageIncWlPlace+" / "+totalCountIncWlPlace+" " ; 
}
var downPageIncWlPlace =function(){

       var pagenumbers=new Number(pagenumberIncWlPlace)+1;
       pagenumberIncWlPlace=pagenumbers.toString();
      getVOIncWlPlace(queryvoIncWlPlace,pagenumberIncWlPlace,pagesizeIncWlPlace,orderByIncWlPlace);  
      //dijit.byId("grid").updateRowCount(querydata.length);      //dijit.byId("grid").update();
			var totalpageIncWlPlace=Math.ceil(new Number(totalCountIncWlPlace)/pagesizeIncWlPlace);
			if(totalpageIncWlPlace==pagenumberIncWlPlace){
			dijit.byId("but7IncWlPlace").setDisabled(true);
      }
      if(pagenumber>1){
      dijit.byId("but6IncWlPlace").setDisabled(false);
      }
      var totalpageIncWlPlace=Math.ceil(new Number(totalCountIncWlPlace)/pagesizeIncWlPlace);
      document.getElementById("rowCountIncWlPlace").innerHTML=" "+pagenumberIncWlPlace+" / "+totalpageIncWlPlace+" / "+totalCountIncWlPlace+" " ; 
      
}
 

   
function querybuttonIncWlPlace(){
              //var p = new SOAPClientParameters2();
              var d,n;
              var validstate=0;
              //queryIncWlPlacevo.id=0 ;
              queryIncWlPlacevo=new WlPlaceVOJs();
              if(querypostCodeIncWlPlace.getDisplayedValue()!="")queryIncWlPlacevo.postCode=querypostCodeIncWlPlace.getDisplayedValue();//
              if(queryplaceNameIncWlPlace.getDisplayedValue()!="")queryIncWlPlacevo.placeName=queryplaceNameIncWlPlace.getDisplayedValue();//
              n=queryNumber_fun("parentPlaceIdIncWlPlace");
              if(n==null){validstate=1;}else if(n.upSign!="%"){queryIncWlPlacevo.parentPlaceId=n;}  
              if(queryplaceTypeIncWlPlace.getDisplayedValue()!="")queryIncWlPlacevo.placeType=queryplaceTypeIncWlPlace.getDisplayedValue();//
              if(querytrafficeGradeIncWlPlace.getDisplayedValue()!="")queryIncWlPlacevo.trafficeGrade=querytrafficeGradeIncWlPlace.getDisplayedValue();//
              if(queryremarkIncWlPlace.getDisplayedValue()!="")queryIncWlPlacevo.remark=queryremarkIncWlPlace.getDisplayedValue();//
        if(validstate==0){
              pagenumberIncWlPlace=1;
              getVOIncWlPlace(queryIncWlPlacevo,pagenumberIncWlPlace,pagesizeIncWlPlace,orderByIncWlPlace); 
             // if(totalpageIncWlPlace>1){dijit.byId("but7IncWlPlace").setDisabled(false);}else{dijit.byId("but7IncWlPlace").setDisabled(true);} 
             }      
       }


 

var  querydisIncWlPlace = function(){
               querydisplay("queryDivIncWlPlace");
            }
             

 
var initIncWlPlace=function(){
  getVOIncWlPlace(queryIncWlPlacevo,pagenumberIncWlPlace,pagesizeIncWlPlace,orderByIncWlPlace);
  if(totalpageIncWlPlace>1){dijit.byId("but7IncWlPlace").setDisabled(false);}else{dijit.byId("but7IncWlPlace").setDisabled(true);}
}
          
</script>

     
     
